import worker from '@ohos.worker'

const parent = worker.workerPort

parent.onmessage = function (message) {
  console.log("-----worker-----", JSON.stringify(message));
  setTimeout(() => {
    parent.postMessage("worker 完成")
  }, 1000)
}